org.eclipse.vtp.framework.interactions.voice.vxml
Class Error

java.lang.Object
  extended by org.eclipse.vtp.framework.interactions.core.support.Widget
      extended by org.eclipse.vtp.framework.interactions.voice.vxml.EventHandler
          extended by org.eclipse.vtp.framework.interactions.voice.vxml.Catch
              extended by org.eclipse.vtp.framework.interactions.voice.vxml.Error
All Implemented Interfaces:
VXMLConstants

public class Error
extends Catch

The Error class represents the <error> VXML element. This type of event handler only receives errors. Error event names start with "error." and can be well known or platform specific.

An Error instance catches only errors with names that match the specified name. The specified error name matches if it is equal to or is a prefix of the name of the generated error.

As with other event handlers execution of the error handler is dependent on the evaluation of the conditional expression and the numbers of times it has occurred during the processing of the current VXML document.

Version:
2.0
Author:
Trip Gilman, Lonnie Pryor

Field Summary
 
Fields inherited from class org.eclipse.vtp.framework.interactions.voice.vxml.Catch
eventName
 
Fields inherited from interface org.eclipse.vtp.framework.interactions.voice.vxml.VXMLConstants
EMPTY, FILE_EXT_GSL, FILLED_MODE_ALL, FILLED_MODE_ANY, GRAMMAR_MODE_DTMF, GRAMMAR_MODE_VOICE, METHOD_GET, METHOD_POST, MIME_TYPE_GSL, MIME_TYPE_SRGS, NAME_APPLICATION, NAME_ASSIGN, NAME_AUDIO, NAME_BARGEIN, NAME_BEEP, NAME_BLOCK, NAME_BRIDGE, NAME_CATCH, NAME_CHOICE, NAME_COMPLETETIMEOUT, NAME_COND, NAME_CONFIDENCELEVEL, NAME_COUNT, NAME_DEST, NAME_DISCONNECT, NAME_DTMF, NAME_DTMFTERM, NAME_ELSE, NAME_ELSEIF, NAME_ENCTYPE, NAME_ENUMERATE, NAME_ERROR, NAME_EVENT, NAME_EVENTEXPR, NAME_EXIT, NAME_EXPR, NAME_FIELD, NAME_FILLED, NAME_FINALSILENCE, NAME_FORM, NAME_GOTO, NAME_GRAMMAR, NAME_ID, NAME_IF, NAME_INCOMPLETETIMEOUT, NAME_INPUTMODES, NAME_INTERDIGITTIMEOUT, NAME_ITEM, NAME_MAXNBEST, NAME_MAXSPEECHTIMEOUT, NAME_MAXTIME, NAME_MENU, NAME_METHOD, NAME_MODE, NAME_NAME, NAME_NAMELIST, NAME_NEXT, NAME_NOINPUT, NAME_NOMATCH, NAME_ONE_OF, NAME_OPTION, NAME_PARAM, NAME_PROMPT, NAME_PROPERTY, NAME_RECORD, NAME_REPEAT, NAME_REPROMPT, NAME_RETURN, NAME_ROOT, NAME_RULE, NAME_SCOPE, NAME_SCRIPT, NAME_SENSITIVITY, NAME_SPEEDVSACCURACY, NAME_SRC, NAME_SUBDIALOG, NAME_SUBMIT, NAME_TERMCHAR, NAME_TERMTIMEOUT, NAME_THROW, NAME_TIMEOUT, NAME_TRANSFER, NAME_TYPE, NAME_VALUE, NAME_VAR, NAME_VERSION, NAME_VXML, NAMESPACE_URI_VXML, QNAME_XML_LANG, SCOPE_DIALOG, SCOPE_DOCUMENT, TYPE_CDATA, VERSION_2_0
 
Constructor Summary
Error(java.lang.String errorName)
          Creates a new instance of the Error class that will catch errors whose names match the errorName argument.
Error(java.lang.String errorName, int count)
          Creates a new instance of the Error class that will catch errors whose names match the errorName argument and who have occurred count number of times.
Error(java.lang.String errorName, java.lang.String condition)
          Creates a new instance of the Error class that will catch errors whose names match the errorName argument, but only when the conditional expression evaluates to true.
Error(java.lang.String errorName, java.lang.String condition, int count)
          Creates a new instance of the Error class that will catch errors whose names match the errorName argument and who have occurred count number of times, but only when the conditional expression evaluates to true.
 
Method Summary
 void writeWidget(org.xml.sax.ContentHandler outputHandler)
          Writes the content of this widget to an XML content handler.
 
Methods inherited from class org.eclipse.vtp.framework.interactions.voice.vxml.Catch
getEventName, setEventName, writeAttributes
 
Methods inherited from class org.eclipse.vtp.framework.interactions.voice.vxml.EventHandler
addAction, addIfClause, getActionsAndIfClauses, getCondition, getCount, removeAction, removeIfClause, setCondition, setCount, writeActionsAndIfClauses
 
Methods inherited from class org.eclipse.vtp.framework.interactions.core.support.Widget
toString, writeAttribute, writeChildren, writeChildren, writeWidget, writeWidget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Error

public Error(java.lang.String errorName)
Creates a new instance of the Error class that will catch errors whose names match the errorName argument. Throws an IllegalArgumentException if the error name is null.

Parameters:
errorName - The name or prefix of the errors to catch.
Throws:
java.lang.IllegalArgumentException - If the supplied error name is empty.
java.lang.NullPointerException - If the supplied error name is null.

Error

public Error(java.lang.String errorName,
             int count)
Creates a new instance of the Error class that will catch errors whose names match the errorName argument and who have occurred count number of times. Throws an IllegalArgumentException if the error name is null.

Parameters:
errorName - The name or prefix of the errors to catch.
count - The occurrence of the named error to catch.
Throws:
java.lang.IllegalArgumentException - If the supplied error name is empty.
java.lang.NullPointerException - If the supplied error name is null.

Error

public Error(java.lang.String errorName,
             java.lang.String condition)
Creates a new instance of the Error class that will catch errors whose names match the errorName argument, but only when the conditional expression evaluates to true. Throws an IllegalArgumentException if the error name is null.

Parameters:
errorName - The name or prefix of the errors to catch.
condition - An expression that must evaluate to true for this instance to catch an error.
Throws:
java.lang.IllegalArgumentException - If the supplied error name is empty.
java.lang.IllegalArgumentException - If the supplied condition is empty.
java.lang.NullPointerException - If the supplied error name is null.

Error

public Error(java.lang.String errorName,
             java.lang.String condition,
             int count)
Creates a new instance of the Error class that will catch errors whose names match the errorName argument and who have occurred count number of times, but only when the conditional expression evaluates to true. Throws an IllegalArgumentException if the error name is null.

Parameters:
errorName - The name or prefix of the errors to catch.
condition - An expression that must evaluate to true for this instance to catch an error.
count - The occurrence of the named error to catch.
Throws:
java.lang.IllegalArgumentException - If the supplied error name is empty.
java.lang.IllegalArgumentException - If the supplied condition is empty.
java.lang.NullPointerException - If the supplied error name is null.
Method Detail

writeWidget

public void writeWidget(org.xml.sax.ContentHandler outputHandler)
                 throws java.lang.NullPointerException,
                        org.xml.sax.SAXException
Description copied from class: Widget
Writes the content of this widget to an XML content handler.

Overrides:
writeWidget in class Catch
Parameters:
outputHandler - The handler to write this widget to.
Throws:
java.lang.NullPointerException - If the supplied content handler is null.
org.xml.sax.SAXException - If the writing of this widget fails.